<template>
  <div id="app">
    <el-container>
      <el-header>
        <ViewHeader></ViewHeader>
      </el-header>
      <el-main>
        <el-tabs v-model="activeName">
          <el-tab-pane label="定位管理" name="location">
            <LocationView></LocationView>
          </el-tab-pane>
          <el-tab-pane label="指纹管理" name="fingerprint">
            <FingerprintTable></FingerprintTable>
          </el-tab-pane>
          <el-tab-pane label="设备管理" name="device">
            <DeviceTable></DeviceTable>
          </el-tab-pane>
        </el-tabs>

        <hr />
      </el-main>
    </el-container>
  </div>
</template>

<script>

import TestOpenlayer from './components/TestOpenLayer.vue'
import ViewHeader from './components/ViewHeader.vue'
import LocationView from './components/LocationView.vue'
import FingerprintTable from './components/FingerprintTable.vue'
import DeviceTable from './components/DeviceTable.vue'

export default {
  name: 'App',
  components: {
    TestOpenlayer,
    ViewHeader,
    LocationView,
    FingerprintTable,
    DeviceTable
  },
  data() {
    return {
      activeName: 'location',
    }
  },
  mounted() {
    this.$store.dispatch('getReferencePoints')
    this.$store.dispatch('getDevices')
  },
}
</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>
